﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LINQPad.Extensibility.DataContext;

namespace LINQPad.OpenAccess.Tests.UIApp.Mocks
{
    public class MockDatabaseInfo : IDatabaseInfo
    {
        #region IDatabaseInfo Members

        public bool AttachFile { get; set; }

        public string AttachFileName { get; set; }

        public string CustomCxString { get; set; }

        public string Database { get; set; }


        public string DbVersion { get; set; }

        public bool EncryptCustomCxString { get; set; }

        public bool EncryptTraffic { get; set; }


        public System.Data.IDbConnection GetConnection( )
        {
            throw new NotImplementedException( "No supported by this mock instance !" );
        }

        public string GetCxString( )
        {
            return this.CustomCxString;

        }

        public string GetDatabaseDescription( )
        {
            return "just a mock";
        }

        public System.Data.Common.DbProviderFactory GetProviderFactory( )
        {
            throw new NotImplementedException( );
        }

        public bool IsEquivalent( IDatabaseInfo other )
        {
            return false;

        }

        public bool IsSqlCE
        {
            get { return false; }
        }

        public bool IsSqlServer
        {
            get { return true; }
        }

        public int MaxDatabaseSize
        {
            get;
            set;
        }

        public string Password
        {
            get;
            set;
        }

        public string Provider
        {
            get;
            set;
        }

        public string Server
        {
            get;
            set;
        }

        public bool SqlSecurity
        {
            get;
            set;
        }

        public bool UserInstance
        {
            get;
            set;
        }

        public string UserName
        {
            get;
            set;
        }

        #endregion
    }
}
